#pragma once
#include <iostream>
#include <string>
#include <vector>
#include <sstream>

#ifdef __GCC
#define nullptr NULL
#endif

template<typename _Type>
std::string StdToStr(_Type Value)
{
	std::stringstream Stream;
	Stream << Value;

	return Stream.str();
}

template<typename _Type>
_Type StrToStd(std::string Value)
{
	std::stringstream Stream;
	Stream << Value;

	_Type Return;
	Stream >> Return;

	return Return;
}

template <class T>
bool from_string(T& t,
                 const std::string& s,
                 std::ios_base& (*f)(std::ios_base&))
{
  std::istringstream iss(s);
  return !(iss >> f >> t).fail();
}
